package com.atguigu.springcloud;

import com.atguigu.ribbonrule.MyRibbonRuleConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

@SpringBootApplication
@EnableEurekaClient // Ribbon和Eureka整合，所以使用Ribbon的客户端需要在主启动类上添加这个注解
// 替换掉Ribbon默认的负载均衡策略(默认负载均衡策略是轮询)
@RibbonClient(name = "MICROSERVICECLOUD-DEPT",configuration = {MyRibbonRuleConfiguration.class})
public class DeptConsumer80_App {

    public static void main(String[] args) {
        SpringApplication.run(DeptConsumer80_App.class,args);
    }
}
